


set(net_SRCS
        InetAddress.cpp
        SocketsOps.cpp
        EventLoop.cpp
        Buffer.cpp
        Timer.cpp
        TimerQueue.cpp
        Channel.cpp
        Poller.cpp
        poller/PollPoller.cpp
        poller/EpollPoller.cpp
        poller/DefaultPoller.cpp
        EventLoopThread.cpp
        Acceptor.cpp
        Socket.cpp
        TcpServer.cpp
        EventLoopThreadPool.cpp
        TcpConnection.cpp
        Connector.cpp
        TcpClient.cpp
        )

add_library(lzweb_net ${net_SRCS})

target_link_libraries(lzweb_net lzweb_base)
install(TARGETS lzweb_net DESTINATION lib)

set(HEADERS
        InetAddress.h
        SocketsOps.h
        Endian.h
        EventLoop.h
        Buffer.h
        Callbacks.h
        TimerId.h
        Timer.h
        TimerQueue.h
        Channel.h
        Poller.h
        EventLoopThread.h
        Acceptor.h
        Socket.h
        TcpServer.h
        EventLoopThreadPool.h
        TcpConnection.h
        Connector.h
        TcpClient.h
        )

install(FILES ${HEADERS} DESTINATION include/lzweb/net)


add_subdirectory(http)
